Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the documentation to clarify usage instructions and fix issue #210. The changes primarily shift from a Metro-based require resolution approach to a Babel plugin transformation approach, while also providing clearer build instructions for Android development.
- Replaced Metro config with Babel plugin configuration for resolving Node-API dynamic libraries
- Added comprehensive Android build instructions including React Native and Hermes source building
- Updated the native module build process to use cmake-rn instead of the previous shorthand command
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/USAGE.md | Updates configuration from Metro to Babel plugin, adds CMakeLists.txt example, and updates build commands |
| docs/HOW-IT-WORKS.md | Removes outdated path-hashing documentation that is no longer used |
| docs/ANDROID.md | Adds detailed instructions for building React Native from source with custom Hermes version |
| ``` | ||
|
|
||
| ### Load and export the native module | ||
|
|
There was a problem hiding this comment.
The path './build/Release/addon.node' should be documented to explain that this is the output path from the cmake-rn build process, as it may not be immediately clear to developers where this path comes from.
| <!-- | |
| The path './build/Release/addon.node' refers to the output file generated by the `cmake-rn` build process. | |
| After running `npx cmake-rn`, the compiled native module will be placed at this location. | |
| --> |
| ``` | ||
| This will print a path which needs to be stored in `REACT_NATIVE_OVERRIDE_HERMES_DIR` to instruct the React Native Gradle scripts to use it. | ||
There was a problem hiding this comment.
[nitpick] Consider adding an example of what the printed path looks like to help developers understand the expected output format.
| Example output: | |
/path/to/your/project/node_modules/.cache/react-native-node-api/hermes-android-0.73.3
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Merging this PR will fix #210 by: